package com.example.demoamqp.conatants;

/**
 * @className: RabbitMQConstants
 * @projectName: demo-one
 * @auth: rosszhang
 * @date: 2023/12/28 14:38
 */
public interface Constants {

    /**
     * 点对点模式
     */
    public static final String WORK_QUEUE = "test_queue";
    public static final String WORK_QUEUE_EXCHANGES = "test_queue_exchanges";


    /*        发布订阅者模式                     */
    String MQ_MAIL_QUEUE = "mq_email_queue";
    String MQ_PHONE_QUEUE = "mq_phone_queue";
    String MQ_FANOUT_EXCHANGE = "mq_fanout_exchange";


    /*        topic模式                  */
    String MQ_TOPIC_EXCHANGE = "mq_topic_exchange";

    String MQ_TOPIC_QUEUE_A = "mq_topic_queue_a";
    String MQ_TOPIC_QUEUE_B = "mq_topic_queue_b";


    /**
     * -*-*-*--*-*-*-*-  死刑队列  *-*-*-*-*-*-*-*-*-*-*-*-*-
     **/
    String MQ_DELAY_QUEUE = "mq_delay_queue"; // 延迟队列，死信队列
    String MQ_DELAY_EXCHANGE = "mq_delay_exchange"; // 死信交换机
    String MQ_DELAY_ROUTING_KEY = "mq_delay_routing_key"; // 死信路由

    // 正常的队列，交换机，路由
    String MQ_NORMAL_QUEUE = "mq_normal_queue";
    String MQ_NORMAL_EXCHANGE = "mq_normal_exchange";
    String MQ_NORMAL_ROUTING_KEY = "mq_normal_routing_key";


    /*------------------      延迟队列         ----------------------*/
    // 普通交换机名称
    public static final String EXCHANGE_X = "mq_board_exchange";
    // 死信交换机名称
    public static final String EXCHANGE_DEAD_Y = "mq_dead_letter_exchange";

    // 普通队列名称
    public static final String QUEUE_A = MQ_NORMAL_QUEUE + "A";
    public static final String QUEUE_B = MQ_NORMAL_QUEUE + "B";

    // 死信队列名称
    public static final String QUEUE_DEAD_D = "mq_dead_letter_queue";


    // 参数 String name, boolean durable, boolean exclusive, boolean autoDelete
    boolean durable = true;
    boolean exclusive = false;
    boolean autoDelete = false;
}
